import { postMethod, getMethod } from "../../../../utils/http";

export async function getList(current, status, schoolId) {
    return await postMethod(`xyxy/wxapp/web/user/page`, {
        params: {
            current,
            status,
            schoolId
        }
    });
}
export async function getSchoolList() {
    return await postMethod(`xyxy/wxapp/web/school/list`, {});
}


export async function add(data = {}) {
    return await postMethod(`xyxy/wxapp/web/user/add`, {
        params: {
            ...data,
        }
    });
}

export async function queryItem(id) {
    return await postMethod(`xyxy/wxapp/web/user/view?id=${id}`, {});
}

export async function edit(data) {
    return await postMethod(`xyxy/wxapp/web/user/update`, {
        params: {
            ...data,
        }
    });
}

export async function del(id) {
    return await postMethod(`xyxy/wxapp/web/user/del?id=${id}`, {

    });
}
// 置顶卡列表
export async function getCardList() {
    return await postMethod(`xyxy/wxapp/web/topCard/cardList`, {});
}
// 给这个该死的用户加置顶卡
export async function addUserCard(cardId,userId) {
    return await postMethod(`xyxy/wxapp/web/user/addTopCard`, {
        params: {
            topCardId:cardId,
            userId,
        }
    });
}
// 给这个该死的用户减置顶卡
export async function subUserCard(cardId,userId) {
    return await postMethod(`xyxy/wxapp/web/user/subTopCard`, {
        params: {
            topCardId:cardId,
            userId,
        }
    });
}

// 

